package com.ruoyi.zyx.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.zyx.mapper.ZyxOrdershareMapper;
import com.ruoyi.zyx.domain.ZyxOrdershare;
import com.ruoyi.zyx.service.IZyxOrdershareService;

/**
 * 共享Service业务层处理
 *
 * @author lhs
 * @date 2021-06-10
 */
@Service
public class ZyxOrdershareServiceImpl implements IZyxOrdershareService
{
    @Autowired
    private ZyxOrdershareMapper zyxOrdershareMapper;

    /**
     * 查询共享
     *
     * @param id 共享ID
     * @return 共享
     */
    @Override
    public ZyxOrdershare selectZyxOrdershareById(Long id)
    {
        return zyxOrdershareMapper.selectZyxOrdershareById(id);
    }

    /**
     * 查询共享列表
     *
     * @param zyxOrdershare 共享
     * @return 共享
     */
    @Override
    public List<ZyxOrdershare> selectZyxOrdershareList(ZyxOrdershare zyxOrdershare)
    {
        return zyxOrdershareMapper.selectZyxOrdershareList(zyxOrdershare);
    }

    @Override
    public List<ZyxOrdershare> listMyOrdershare(ZyxOrdershare zyxOrdershare) {
        return zyxOrdershareMapper.selectZyxOrdershareList(zyxOrdershare);
    }

    @Override
    public List<Integer> selectZyxOrdershareListByOrderId(Long sendorderid) {
        return zyxOrdershareMapper.selectZyxOrdershareListByOrderId(sendorderid);
    }

    /**
     * 新增共享
     *
     * @param zyxOrdershare 共享
     * @return 结果
     */
    @Override
    public int insertZyxOrdershare(ZyxOrdershare zyxOrdershare)
    {
        return zyxOrdershareMapper.insertZyxOrdershare(zyxOrdershare);
    }

    /**
     * 修改共享
     *
     * @param zyxOrdershare 共享
     * @return 结果
     */
    @Override
    public int updateZyxOrdershare(ZyxOrdershare zyxOrdershare)
    {
        return zyxOrdershareMapper.updateZyxOrdershare(zyxOrdershare);
    }

    /**
     * 批量删除共享
     *
     * @param ids 需要删除的共享ID
     * @return 结果
     */
    @Override
    public int deleteZyxOrdershareByIds(Long[] ids)
    {
        return zyxOrdershareMapper.deleteZyxOrdershareByIds(ids);
    }

    /**
     * 删除共享信息
     *
     * @param id 共享ID
     * @return 结果
     */
    @Override
    public int deleteZyxOrdershareById(Long id)
    {
        return zyxOrdershareMapper.deleteZyxOrdershareById(id);
    }

    @Override
    public int delByOrderId(Long sendorderid) {
        return zyxOrdershareMapper.delByOrderId(sendorderid);
    }
}
